Skip to main content

Testing a gRPC service

Why test

Testing with Postman

Testing service operations

https://learn.microsoft.com/en-us/aspnet/core/grpc/test-services?view=aspnetcore-7.0 There are three common approaches for testing gRPC services:

  • Manual testing: Test gRPC servers with ad hoc calls.(Postman, grpCurl, etc)
  • Unit testing: Test gRPC services directly from a unit testing library.
  • Integration testing: The gRPC app is hosted in TestServer, an in-memory test server from the Microsoft.AspNetCore.TestHost package. gRPC services are tested by calling them using a gRPC client from a unit testing library.

Unit testing